import { fromEvent, Observable, Subject } from 'rxjs';
import { Inject } from '../../exports';

export namespace NTableEvent {
  export type TScrollDirective = 'top' | 'bottom'|'left'|'right';
  export interface IMouseEvent {
    scrollObs$: Observable<{ height: number, directive: TScrollDirective, width: number }>;
    contextMenu$: Observable<{x: number, y: number}>;
    tableResize$: Observable<{type: string, payload: any}>;
    click$: Observable<ExcelClickEvent>;
    dbclick$: Observable<ExcelDbclickEvent>;
    mouseup$: Observable<ExcelMouseupEvent>;
    hover$: Observable<ExcelHoverEvent>;
    mouseover$: Observable<ExcelMouseoverEvent>;
    mouseout$: Observable<ExcelMouseoutEvent>;
  }
  export interface IGenerateEvent {
    customEvent$: Observable<{type: string, payload: any}>;
  }
  export interface IDataEvent {
    tableCellValueChange: Subject<{row: number, col: number}>;
    tableRowValueChange: Subject<{row: number}>;
    tableColValueChange: Subject<{col: number}>;
    tableValueRefresh: Subject<{col: number}>;
    clearEmptyTableData: Subject<{row:number,col: number}>;

  }
}
